<%-- 
    Document   : loginCliente
    Created on : 09/11/2010, 21:57:05
    Author     : renan
--%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="../../css/style.css">
    <script type="text/javascript" src="../../js/funcoes.js"></script>
    <title>Login Clientes</title>
</head>
<f:view>
    <h:form>
        <html>
            <body>
                <table>
                    <tr>
                        <td>
                            <div class="principal">
                                <div class="titulo">
                                    <a id="linkTitle" href="../../inicial.jsp"><img alt=""  src="../../imagens/Logo.jpg" style="width: 140px; height: 100px; padding-left: 20px; padding-top: 10px;" ></a>
                                </div>
                                <div class="central2" >
                                    <br><br>
                                    <h1 align="center">Para visualizar os Quartos é preciso Autenticar-se</h1>
                                    <table align="center">
                                        <tr>
                                            <td>
                                                <rich:panel id="painelLogin" style="width: 250px;">
                                                    <f:facet  name="header">
                                                        <h:outputText value="Autenticação de Clientes"></h:outputText>
                                                    </f:facet>
                                                    <h:panelGrid columns="2">
                                                        <h:column><h:outputText value="Login:"/></h:column>
                                                        <h:column><h:inputText onkeydown="mascara(this,maiusculo);" onfocus="ganhouFoco(this);" onblur="perdeuFoco(this);" maxlength="10" id="login" value="#{usuarioFrm.usuario.usuario.login}"/></h:column>
                                                        <h:column><h:outputText value="Senha:"/></h:column>
                                                        <h:column><h:inputSecret maxlength="10" id="senha" value="#{usuarioFrm.usuario.usuario.senha}"/></h:column>
                                                    </h:panelGrid>
                                                    <a4j:commandButton action="#{usuarioFrm.autenticarCliente}" value="Logar" reRender="login,senha,erros"/>
                                                    <b><a style="color:blue" href="../cadastro/cliente.faces">Não Possuo Login</a></b>
                                                    <a4j:status>
                                                        <f:facet name="start">
                                                            <h:graphicImage value="../../imagens/ajax-loader.gif"/>
                                                        </f:facet>
                                                    </a4j:status>
                                                </rich:panel>
                                                <!-- AREA DE MENSAGENS -->
                                                <h:panelGroup id="erros">
                                                    <rich:messages globalOnly="true" layout="table" styleClass="textoErro">
                                                        <f:facet name="errorMarker">
                                                            <h:graphicImage value="../../imagens/error.gif"/>
                                                        </f:facet>
                                                    </rich:messages>
                                                </h:panelGroup>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </body>
        </html>
    </h:form>
</f:view>
